import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;


public class Ramdom {
	
	private List<String> fileNameList = new ArrayList<String>();
	
	public String getFileName() throws Exception {
		Date date = new Date();
		String fileName = "CF"
				+new SimpleDateFormat("MMdd").format(date)
				+0
				+Math.round(Math.random()*900+100);
		if(fileNameList.contains(fileName)){
			this.getFileName();
		}else{
			fileNameList.add(fileName);
		}
		return fileName;
	}
	public static void main(String[] args) throws Exception {
		Ramdom r = new Ramdom();
		System.out.println(r.getFileName());
	}
	// @return the fileNameList
	
	public List<String> getFileNameList() {
		return fileNameList;
	}
	// @param fileNameList the fileNameList to set
	
	public void setFileNameList(List<String> fileNameList) {
		this.fileNameList = fileNameList;
	}

}
